package com.tdkj.model.shop;

import java.math.BigDecimal;
import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * ShoppingCartContents entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "shop_shopping_cart_item")
public class BeanShoppingCartItem extends BaseEntity {

	private Integer quantity;
	private Timestamp addTime;
	
	private BeanGood good;
	
	//-1,0,1,2 物流方式 -1 为卖家承担运费
	private Integer logisticsApproach;
	
	//物流价格
	private BigDecimal logisticsPrice;
	
	private BeanShoppingCart cart;

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	@ManyToOne(fetch=FetchType.LAZY, cascade={CascadeType.REFRESH})
	@JoinColumn(name="good_id")
	public BeanGood getGood() {
		return good;
	}

	public void setGood(BeanGood good) {
		this.good = good;
	}

	@ManyToOne(fetch=FetchType.LAZY, cascade={CascadeType.REFRESH})
	@JoinColumn(name="cart_id")
	public BeanShoppingCart getCart() {
		return cart;
	}

	public void setCart(BeanShoppingCart cart) {
		this.cart = cart;
	}

	public Timestamp getAddTime() {
		return addTime;
	}

	public void setAddTime(Timestamp addTime) {
		this.addTime = addTime;
	}

	public Integer getLogisticsApproach() {
		return logisticsApproach;
	}

	public void setLogisticsApproach(Integer logisticsApproach) {
		this.logisticsApproach = logisticsApproach;
	}

	public BigDecimal getLogisticsPrice() {
		return logisticsPrice;
	}

	public void setLogisticsPrice(BigDecimal logisticsPrice) {
		this.logisticsPrice = logisticsPrice;
	}

	
}